ADD_LIBRARY(TrainingBookLib activity-analysis-dialog.cpp
                            ActivityColumns.cpp
                            Activity.cpp
                            activity-edit-dialog.cpp
                            ActivityHeader.cpp
                            ActivityHistory.cpp
                            activity-notebook.cpp
                            activity-tree-view.cpp
                            activity-types.cpp
                            application.cpp
                            date-selection-dialog.cpp
                            DateTime.cpp
                            date-time-entry.cpp
                            double-entry.cpp
                            Duration.cpp
                            DurationEntry.cpp
                            filesystem-utils.cpp
                            import-activity-columns.cpp
                            import-activity-tree-view.cpp
                            IntegerEntry.cpp
                            Interval.cpp
                            osm-map-area.cpp
                            osm-map-bounding-box.cpp
                            osm-map-tile-cache.cpp
                            preferences-dialog.cpp
                            rgb-color.cpp
                            RichTrackPoint.cpp
                            t-bmain-window.cpp
                            tcx-import-dialog.cpp
                            track.cpp
                            track-elevation-dialog.cpp
                            track-point.cpp
                            track-segment.cpp
                            track-view-dialog.cpp
                            TrainingBook.cpp
                            user-day.cpp
                            user-day-edit-dialog.cpp
                            x-y-plot-area.cpp
)

ADD_EXECUTABLE(TrainingBook main.cpp)

SET_TARGET_PROPERTIES(TrainingBookLib PROPERTIES
                     VERSION ${TrainingBook_VERSION}
                     SOVERSION ${TrainingBook_VERSION_MAJOR}
                     )

SET_TARGET_PROPERTIES(TrainingBook PROPERTIES 
                      COMPILE_FLAGS ${LIBXMLPP_CFLAGS} 
                      COMPILE_FLAGS "${GTKMM_CFLAGS}"+"${CURL_CFLAGS}")

#INSTALL(TARGETS TrainingBookLib
#  DESTINATION lib
#  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
#  )

#INSTALL(TARGETS TrainingBook
#  DESTINATION bin
#  PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
#  )






target_link_libraries(
        TrainingBook
        TrainingBookLib
        ${LIBXMLPP_LIBRARIES}
        ${GTKMM_LIBRARIES}
        ${CURL_LIBRARIES}
)